{extend name="layout/base" /}
<!-- 标题 -->
{block name="title"}{$column['column_name']} - 分类排序{/block}
<!-- CSS -->
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/lib/nestable/jquery.nestable.css" rel="stylesheet">
{/block}
<!-- 具体内容 -->
{block name="content"}
<h2 class="header-dividing">{$column['column_name']} <small>栏目排序</small></h2>
<div class="navbar navbar-default navbar-content">
    <div class="collapse navbar-collapse">
        <ul class="nav navbar-nav">
            <li><a href="{:url('@admin/wscate', $urlparam)}"> <i class="icon icon-branch"></i> 内容分类</a></li>
            <li><a href="{:url('@admin/'.$column->module->module_path, $urlparam)}"> <i class="icon icon-history text-danger"></i> {$column['column_name']}</a></li>
        </ul>
    </div>
</div>
<div class="panel">
    <div class="panel-body p10">
        <div class="col-md-6">
            <div class="dd" id="nestable">
                <ol class="dd-list">
                    {$html|raw}
                </ol>
            </div>
        </div>
        <div class="col-md-6">
            <form method="post" action="{:url('@admin/wscate/sort_save')}" id="form-page-submit">
                <input type="hidden" name="backurl" value="{:url('@admin/wscate','siteid='.$siteid.'&columnid='.$columnid)}">
                <input type="hidden" name="siteid" value="{$siteid}">
                <input type="hidden" name="columnid" value="{$columnid}">
                <div class="alert alert-success">
                    <strong>操作方式：</strong> 拖拽要操作的分类，可以对分类进行上下移动调整顺序。也可以把一个分类拖拽到另外一个分类下面作为子分类。
                </div>
                <textarea name="wscate_json" cols="30" rows="10" class="form-control hidden" id="nestable-output" readonly="true"></textarea>
                <div class="col-md-12 text-center">
                    <button class="btn btn-nestable" data-action="collapseAll" type="button">全部折叠</button>
                    <button class="btn btn-primary" type="submit">保存排序</button>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
<!-- JS -->
{block name="js"}
    {load href="/static/lib/nestable/jquery.nestable.js"}
    {load href="/static/lib/jquery/jquery.form.js"}
    {load href="/static/lib/validator/validator.min.js"}
{/block}
{block name="jscode"}

{/block}